package com.travelsky.app.util;
import net.sf.ehcache.Cache;
import net.sf.ehcache.CacheManager;

public class CacheUtil {
	private static final CacheManager cacheManager = CacheManager.create();
	public static Cache getCache(String cacheId) {
		Cache cache = null;
		cache = (Cache) cacheManager.getCache(cacheId);
		if (cache == null) {
			cacheManager.addCache(cacheId);
		}
		cache = (Cache) cacheManager.getCache(cacheId);
		return cache;
	}
}
